package com.linwancun.lwcyback.service;

import com.linwancun.lwcyback.mapper.HealthassessmentResultMapper;
import com.linwancun.lwcyback.model.HealthassessmentResult;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service
public class HealthAssessmentResultServiceImpl implements HealthAssessmentResultService {
    @Resource
    private HealthassessmentResultMapper healthassessmentResultMapper;

    @Override
    public void insert(HealthassessmentResult object) {
        healthassessmentResultMapper.insert(object);
    }

    @Override
    public void save(HealthassessmentResult object) {
        healthassessmentResultMapper.updateByPrimaryKey(object);
    }

    @Override
    public List<HealthassessmentResult> getAll() {
        return healthassessmentResultMapper.list(new HealthassessmentResult());
    }

    @Override
    public HealthassessmentResult find(HealthassessmentResult object) {
        return healthassessmentResultMapper.find(object);
    }

    @Override
    public void delete(HealthassessmentResult object) {
        healthassessmentResultMapper.deleteByPrimaryKey(object.getResultid());
    }

    @Override
    public List<HealthassessmentResult> getList(HealthassessmentResult object) {
        return healthassessmentResultMapper.list(object);
    }
}
